package cn.iocoder.yudao.module.wms.controller.admin.stockdetail.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.*;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 库存明细新增/修改 Request VO")
@Data
public class StockDetailSaveReqVO {

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24396")
    private Long id;

    @Schema(description = "产品", requiredMode = Schema.RequiredMode.REQUIRED, example = "27550")
    @NotNull(message = "产品不能为空")
    private Long productId;

    @Schema(description = "仓库", requiredMode = Schema.RequiredMode.REQUIRED, example = "6578")
    @NotNull(message = "仓库不能为空")
    private Long warehouseId;

    @Schema(description = "库位", example = "31698")
    private Long positionId;

    @Schema(description = "入库时数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "入库时数量不能为空")
    private BigDecimal totalStockQty;

    @Schema(description = "结余数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结余数量不能为空")
    private BigDecimal stockQty;

    @Schema(description = "单位成本")
    private BigDecimal unitAmt;

    @Schema(description = "合计成本")
    private BigDecimal costAmt;

    @Schema(description = "批次号")
    private String batchNo;

    @Schema(description = "序列号")
    private String serialNo;

    @Schema(description = "来源单据", requiredMode = Schema.RequiredMode.REQUIRED, example = "2605")
    @NotNull(message = "来源单据不能为空")
    private Long docId;

    @Schema(description = "来源单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "来源单号不能为空")
    private String docCode;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "序号不能为空")
    private Integer sequence;

}